package com.augmentum.oes.util;

public class Regex {

    public static String regex(String string) {
        String regex = "[\u4e00-\u9fa5a-zA-Z0-9]";
        StringBuilder stringBuilder = new StringBuilder();
        char[] chars = string.toCharArray();
        for (char getChar : chars) {
            String searchStr = String.valueOf(getChar);
            if (!searchStr.matches(regex)) {
                searchStr="\\"+searchStr;
            }
            stringBuilder.append(searchStr);
        }
        return stringBuilder.toString();
    }

}
